<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta name="author" content="Aurelio Jargas www.aurelio.net">
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<LINK REL="stylesheet" TYPE="text/css" HREF="inc/site.css">
<TITLE>News on Txt2tags v2.1</TITLE>
<link rel="icon" type="image/png" href="/favicon.png">
</HEAD>
<BODY>

<DIV CLASS="header" ID="header">
<H1>News on Txt2tags v2.1</H1>
<H3>Nov 2004</H3>
</DIV>

<DIV CLASS="body" ID="body">
<div id="sidebar">
Hot
  <ul>
  <li id="menuonline"><a href="./online.php">Txt2tags Online</a></li>
  <li id="menumarkup"><a href="./markup.html">Markup Demo</a></li>
  </ul>
About
  <ul>
  <!-- <li id="menuhome"><a href="/">Home</a></li> -->
  <li id="menufeatures"><a href="./features.html">Features</a></li>
  <li id="menusample"><a href="./sample.html">Example</a></li>
  <li id="menushots"><a href="./shots.html">Screenshots</a></li>
  <li id="menudocs"><a href="./docs.html">Documentation</a></li>
  <li id="menutips"><a href="./tips.html">Tips &amp; Tricks</a></li>
<!--
  <li id="menuoldnews"><a href="./misc/oldnews.html">Old News</a></li>
-->
  </ul>
Code
  <ul>
  <li id="menudownload"><a href="./download.html">Download</a></li>
  <li id="menuchangelog"><a href="./changelog.html">Changelog</a></li>
  <li id="menutools"><a href="./tools.html">Tools</a></li>
  <li><a href="http://bugs.txt2tags.org">Bug tracker</a></li>
  <li><a href="http://svn.txt2tags.org">SVN</a></li>
  </ul>
Community
  <ul>
  <li id="menuwiki"><a href="http://wiki.txt2tags.org">Wiki</a></li>
  <li id="menublog"><a href="http://txt2tags.wordpress.com">Blog</a></li>
  <li id="menuteam"><a href="./team/index.html">The Team</a></li>
  <li id="menuchildren"><a href="./children.html">The Children</a></li>
  <li id="menucomments"><a href="http://txt2tags.wordpress.com/user-comments/">User Comments</a></li>
  <li id="menuart"><a href="./art.html">Artwork</a></li>
  </ul>
Social
  <ul>
  <li id="menuml"><a href="./ml.html">Mailing List</a></li>
  <li><a href="http://www.facebook.com/pages/txt2tags/335201827209">Facebook</a></li>
  <li><a href="http://twitter.com/aureliojargas">twitter</a></li>
  <!-- <li><a href="http://www.orkut.com.br/Main#Community?cmm=87935">Orkut</a></li> -->
  <li><a href="http://identi.ca/group/txt2tags">identi.ca</a></li>
  </ul>

<P>
<A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=verde%40aurelio%2enet&amp;item_name=txt2tags%20donation&amp;no_shipping=1&amp;return=http%3a%2f%2faurelio%2enet%2fdonate%2dthanks%2ehtml&amp;cn=&amp;tax=0&amp;currency_code=USD&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8"><IMG ALIGN="middle" SRC="img/donate.png" BORDER="0" alt="DONATE"></A>
</P>
</div>
<P>
A quick guide showing the new features for this version.
For a complete list of all the changes, see the
<A HREF="./changelog.html">ChangeLog</A>.
</P>

<HR NOSHADE SIZE=1>

<P>
Contents of this document (using %%toc):
</P>
<DIV CLASS="toc">

  <UL>
  <LI><A HREF="#toc">New %%toc macro</A>
  <LI><A HREF="#inoutfile">New %%infile and %%outfile macros</A>
  <LI><A HREF="#mtime">New %%mtime macro</A>
  <LI><A HREF="#emptyitem">Now an empty item closes the current list</A>
  <LI><A HREF="#quiet">New options -q and --quiet</A>
  <LI><A HREF="#toconly">Option --toc-only now respecting --outfile</A>
  <LI><A HREF="#toc7">Program Translated to New Languages</A>
  <LI><A HREF="#toc8">Documentation News</A>
  <LI><A HREF="#toc9">Other</A>
  </UL>

</DIV>

<HR NOSHADE SIZE=1>

<H1 ID="toc">New %%toc macro</H1>

<P>
The %%toc macro specifies where the TOC of the document will be
placed. So you can place it wherever needed inside the document.
</P>
<P>
NOTE: %%toc will be expanded only when given the --toc option
</P>
<P>
Rules:
</P>

<UL>
<LI>Valid at the document BODY
<LI>Starts body if it is found on the CONF area
<LI>Must be alone on the line (leading and trailing spaces are allowed)
<LI>Must be used together with --toc, if not, it is ignored
<LI>Multi %%toc macros, on different parts of the document are allowed
<LI>The default automatic TOC positioning/formatting is disabled when a
  %%toc is found
</UL>

<H1 ID="inoutfile">New %%infile and %%outfile macros</H1>

<P>
The %%infile and %%outfile macros are used to get information
about the source and converted file. Useful for footer link like
"<CODE>[See source %%infile]</CODE>" and self mentioning like
"<CODE>This is the %%outfile file</CODE>". So you can change the filename and
the references to it will be updated.
</P>
<P>
Examples:
</P>

<UL>
<LI>This is the <B>v21-news.html</B> page, which originally resides on the
  <B>/Volumes/dados/Dropbox/a/txt2tags/svn/website</B> dir.
<LI>The source of this page is the <B>v21-news.t2t</B> file.
</UL>

<P>
Rules:
</P>

<UL>
<LI>Valid at the document HEADER and BODY
<LI>Starts body if it is found on the CONF area
<LI>Can be at any part of the line, various per line
<LI>Can be used inside links and images marks
<LI>Are expanded to '-' if the file is STDIN or STDOUT
<LI>They accept some % formatters, on the %%infile(formatter) form
</UL>

<P>
Formatters:
</P>

<TABLE ALIGN="center" BORDER="1">
<TR>
<TH>%&lt;char&gt;</TH>
<TH>Description</TH>
<TH>Output for /tmp/txt2tags/mydoc.t2t</TH>
</TR>
<TR>
<TD ALIGN="center">%f</TD>
<TD>The file name</TD>
<TD>mydoc.t2t</TD>
</TR>
<TR>
<TD ALIGN="center">%F</TD>
<TD>The file name (without extension)</TD>
<TD>mydoc</TD>
</TR>
<TR>
<TD ALIGN="center">%e</TD>
<TD>The file extension</TD>
<TD>t2t</TD>
</TR>
<TR>
<TD ALIGN="center">%p</TD>
<TD>The absolute file path</TD>
<TD>/tmp/txt2tags/mydoc.t2t</TD>
</TR>
<TR>
<TD ALIGN="center">%d</TD>
<TD>The file path (directories only)</TD>
<TD>/tmp/txt2tags</TD>
</TR>
<TR>
<TD ALIGN="center">%D</TD>
<TD>The file path (parent dir only)</TD>
<TD>txt2tags</TD>
</TR>
<TR>
<TD ALIGN="center">%%</TD>
<TD>The literal percent char</TD>
<TD>%</TD>
</TR>
</TABLE>

<H1 ID="mtime">New %%mtime macro</H1>

<P>
The %%mtime macro gets information about the source file
modification time. It uses the same formatters accepted by the
%%date macro.
</P>
<P>
Example:
</P>

<UL>
<LI>The last change on the source of this page was made in
  <B>Wed Jan 11 21:17:38 2012</B>.
</UL>

<P>
Rules:
</P>

<UL>
<LI>Valid at the document HEADER and BODY
<LI>Starts body if it is found on the CONF area
<LI>Can be at any part of the line, various per line
<LI>Can be used inside links and images marks
<LI>Accept some % formatters, on the %%mtime(formatter) form
</UL>

<H1 ID="emptyitem">Now an empty item closes the current list</H1>

<P>
The two blank lines are currently used to close all the open lists.
Now there is a lighter alternative, which closes only the currently
opened list or sublist. Just leave an empty list item.
</P>
<P>
Rules:
</P>

<UL>
<LI>The empty list item must have the same type and indentation of the
  previous list items
<LI>You can close just the current opened list, not its parents
<LI>Useful mainly for closing sublists without closing the mother list
<LI>This list is closed this way, for a sample (<A HREF="v21-news.t2t">see source</A>).
</UL>

<H1 ID="quiet">New options -q and --quiet</H1>

<P>
They are used for quiet operation, where txt2tags shows no messages on
the STDOUT. Can be disabled with the --no-quiet option.
</P>

<H1 ID="toconly">Option --toc-only now respecting --outfile</H1>

<P>
Historically, the --toc-only option always dumped the TOC to the
STDOUT. Now, if --outfile was also specified, the TOC is saved to that
file. If no --outfile was specified, or if "-o -" was given, the TOC
is sent to the STDOUT.
</P>

<H1 ID="toc7">Program Translated to New Languages</H1>

<P>
Besides English and Portuguese, now the program interface and messages
are also translated to:
</P>

<UL>
<LI><A HREF="./img/gui-it_IT.png">Italian</A> (it_IT)
<P></P>
<LI><A HREF="./img/gui-hu.png">Hungarian</A> (hu)
</UL>

<P>
<B>Add your language!</B> Get <A HREF="http://txt2tags.googlecode.com/svn/trunk/po/txt2tags.pot">this potfile</A> and
translate the messages. More info on the <A HREF="http://txt2tags.googlecode.com/svn/trunk/po/README">i18n README file</A>.
</P>

<H1 ID="toc8">Documentation News</H1>

<UL>
<LI>New <A HREF="/markup.html">Markup Demo</A> document showing all the txt2tags
  marks and their resulting HTML pair. Beautiful! This document and
  the new User Guide "Mastering Marks" section have obsoleted the
  old RULES file.
<P></P>
<LI>New <A HREF="/writing-book.html">Writing Books with Txt2tags</A> document
  showing tips on using txt2tags on the book writing process.
<P></P>
<LI><A HREF="/userguide/">User Guide</A> now is a PDF file on the tarball and was revamped with
  new chapters:
  <UL>
  <LI>Writing and Converting Your First Document
   (a step-by-step very recommended for beginners)
  <LI>Mastering Txt2tags Concepts
  <LI>Mastering Marks
  <LI>Mastering Macros
  <P></P>
  </UL>
<LI>New portuguese docs: FAQ and Reference Card.
<P></P>
<LI>New spanish docs: translated sample and abuseme files.
</UL>

<H1 ID="toc9">Other</H1>

<UL>
<LI>Misspelled option --css-suggar now changed to --css-sugar. Now both
  forms are accepted. Please, do not use --css-suGGar anymore.
<P></P>
<LI>Now the hyphen char "-" can be used in title anchors.
</UL>

<HR NOSHADE SIZE=1>

<P>
What about the TOC repeated at the end? Strange, but now you can:
</P>
<DIV CLASS="toc">

  <UL>
  <LI><A HREF="#toc">New %%toc macro</A>
  <LI><A HREF="#inoutfile">New %%infile and %%outfile macros</A>
  <LI><A HREF="#mtime">New %%mtime macro</A>
  <LI><A HREF="#emptyitem">Now an empty item closes the current list</A>
  <LI><A HREF="#quiet">New options -q and --quiet</A>
  <LI><A HREF="#toconly">Option --toc-only now respecting --outfile</A>
  <LI><A HREF="#toc7">Program Translated to New Languages</A>
  <LI><A HREF="#toc8">Documentation News</A>
  <LI><A HREF="#toc9">Other</A>
  </UL>

</DIV>

<HR NOSHADE SIZE=1>

<P>
Powered by txt2tags (<A HREF="v21-news.t2t">see source</A>)
</P>
</div><div id="footer">
<P>
<IMG ALIGN="middle" SRC="img/t2tpowered-white.png" BORDER="0" ALT="">
</P>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png"></a>
<P>
Last modified on 11 January 2012 at 21:17
(<A HREF="v21-news.t2t">See sources</A>,
<A HREF="http://validator.w3.org/check?uri=referer">Validate HTML</A>)
</P>
</div><div id="fake">
<!-- Google Analytics code -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-280222-14']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</DIV>

<!-- html code generated by txt2tags 2.6.641 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html ./v21-news.t2t -->
</BODY></HTML>
